/*the above identifies previous use of WEBANIMDESIGNER and clears screens*/
openWAD= getclip('openWAD');if openWAD = "" then DO
/********ENSURES SCREEN NOT TOO SMALL & STUFF IS WITHIN SCREEN**************/
accept = 0
GET 'SCREENW'
scw = result
if scw >= 640 then DO
GET 'SCREENH'
sch = result
if sch >= 400 then DO
GET 'IMAGEW'
imgw = result
if imgw <= scw then DO
GET 'IMAGEH'
imgh = result
if imgh <= sch then accept = 1
END
END
END
if accept = 0 then DO
Requestnotify 'TITLE "CHANGE SCREEN or IMAGE SIZE" PROMPT "For viewability, screen size must be 640x 400 or greater, and image size equal or less the screen size"'
RequestResponse 'PROMPT "If the transitions are not done in the same manner, there will be a pause after each for you to either make a new transition or load one. Cancel to think about this..."'
if rc~=0 then EXIT 0
END
pics=0
cnt=0
DO FOREVER
if pics = numpics then BREAK
pics = pics + 1
/*doall=0***/
if doall=0 then DO
if pics>1 then setframeposition next
call customselect
call dotransition
END
/**doall=1***/
if doall=1 then DO
if pics>1 then setframeposition next
if pics= 1 then call customselect
call dotransition
END
END
Requestnotify 'PROMPT "Done. When run as an anim, you only see a scattering of rectangles. To see the transition, enter Web Anim Designer. Settings required will be transp=0, dispose=0, and optimization=boundaries (These settings will automatically be set in Web Anim Designer if done immediately)"'
call setclip('optimization', 1)
call setclip('transp', 0)
call setclip('dispose', 0)
call setclip('operation',1)
play 3
EXIT 0
/************STAMPS OUT SEGMENTS OF ONE PIC & RETURNS TO ABOVE***********/
if width > imgw-100 then DO; Requestnotify 'TITLE "ANIMBRUSH TO WIDE" PROMPT "The animbrush is too wide. Use larger screen size"';EXIT 0; END
if height > imgh-100 then DO; Requestnotify 'TITLE "ANIMBRUSH TO WIDE" PROMPT "The animbrush is too high. Use larger screen size."'; EXIT 0; END
XX0 = TRUNC((imgw-width)/2)
YY0 = TRUNC((imgh-height)/2)
XX1 = XX0 + width
YY1 = YY0 + height
setbrushhandle UPPERLEFT
UseBrushPalette
GetBrushAttributes 'TRANSPARENCY'
transp = RESULT
IF transp=0 then transpcol = 0
If transp >0 then DO
GetBrushAttributes 'TRANSPARENTCOLOR'
transpcol = RESULT
setpen 'BACKGROUND' transpcol
END
/************CLEAR TO ABRS TRANSP COLOR & STAMP DOWN*************************/
GetBrushInfo 'ANNOTATION'
frame_annot = RESULT
delayannot = 0
loop = -1
delay. = 0
IF WORD(frame_annot, 1) = 'LOOP' & WORD(frame_annot, 3) = 'DELAY' THEN DO
delayannot=1
loop = WORD(frame_annot, 2)
IF ~DATATYPE(loop, 'W') THEN
loop = -1
DO frm = 1 TO pics
del = WORD(frame_annot, 3+frm)
IF DATATYPE(del, 'W') THEN
delay.frm = del
delay.frm = TRUNC(delay.frm*(60/100))
END
END
SETPEN 'BACKGROUND' transpcol
ClearImage
ADDFRAMES pics AFTER
DO frm = 1 TO pics
SETFRAMEPOSITION frm
if delayannot=1 then SETFRAMEDELAY delay.frm
if delayannot = 0 then SETFRAMEDELAY 10
SetBrushAttributes 'FRAMEPOSITION' frm
Usebrushpalette
Putbrush XX0 YY0
END
SETFRAMEPOSITION 1
call setclip('pics', pics)
call setclip('XX0', XX0)
call setclip('YY0', YY0)
call setclip('XX1', XX1)
call setclip('YY1', YY1)
call setclip('openWAD', 1)
call setclip('troperation', 1)
freebrush /*not needed as we make the preview version from the image*/
PLAY
Requestnotify 'TITLE "PROJECT IS NOW SET UP" PROMPT " NEW PROJECT IS SET UP. This is how the animation looks WITHOUT transition. You may add frames and images, edit, etc. but the transition effect will use the size of the original animbrush. Enter WADTransitionMaker again when ready to proceed."'
EXIT 0
/******************************************/
customselect:
deftrans = getclip('deftrans'); if deftrans = "" then deftrans=2
txt_gad_title = 'DEFINE TRANSITION TO BE USED NEXT'